const config = require('./src/constant/Config.js');
module.exports = {
    assetsDir: "static",
    publicPath: "./",
    outputDir: "dist",
    lintOnSave: false, // 关闭eslint
    productionSourceMap: true, // 生产环境下css 分离文件
    devServer: {
      host: "0.0.0.0",
      proxy:
        process.env.NODE_ENV === "production"
          ? {}
          : {
              "/": {
                target: 'https://qs.kelantec.com.cn/',
                changeOrigin: true
              }
            }
    },
    chainWebpack: config => {
      //设置标题  默认不设置的话是项目名字
      config.plugin("html").tap(args => {
        args[0].title = "荣基MES系统";
        return args;
      });
    },
    chainWebpack: config => {
      config.module
        .rule('vue')
        .use('vue-loader')
        .loader('vue-loader')
        .tap(options => {
          options.compilerOptions.whitespace = 'preserve'
          return options
        })
  }
  };